

//查找单链表中间元素
status GetMidNode(LinkList L,ElemType *e)
{
  Linklist search,mid;

  mid = search = L;

  while (search->next !=NULL)
  {
      if (search->next->next !=NULL)
      {
	  search = search->next->next;
	  mid = mid->next;   	  
      }
         else 
      {
	 search = search->next;      
      }
  } 
    *e = mid->data;
      return OK;
}      
